﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TeamNitro
{
    public partial class AdminAccounts : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            List<DBManager> StudentID = DBManager.GetUser("Student");
            List<DBManager> StaffID = DBManager.GetUser("Staff");
            List<DBManager> AdminID = DBManager.GetUser("Admin");

            if (StudentID.Count() == 0)
            {
                lblStudent.Visible = true;
            }

            if (StaffID.Count() == 0)
            {
                lblStaff.Visible = true;
            }

            if (AdminID.Count() == 0)
            {
                lblAdmin.Visible = true;
            }
        }

        protected void GridView2_RowDeleted(object sender, GridViewDeletedEventArgs e)
        {
            Response.Redirect("~/Admin/AdminAccounts.aspx");
        }

        protected void GridView3_RowDeleted(object sender, GridViewDeletedEventArgs e)
        {
            Response.Redirect("~/Admin/AdminAccounts.aspx");
        }

        protected void GridView1_RowDeleted(object sender, GridViewDeletedEventArgs e)
        {
            Response.Redirect("~/Admin/AdminAccounts.aspx");
        }
    }
}